import { add } from './modules/math'
import { max } from './modules/util'

console.log(add(8, 26))
console.log(max(8, 3))

import $ from 'jquery'
$('ul li').each((i, el) => $(el).css('background', i % 2 === 0 ? 'red' : 'green'))

// Webpack天生只能打包js、json文件
import './assets/css/style.css'

import './assets/less/style.less'

const oImg = new Image()

// 通过模块化的方式导入图片文件，因为在Webpack眼里，一切皆模块
import imgUrl from './assets/image/xq.webp'
console.log(imgUrl)
// oImg.src = './assets/image/xq.webp' // ?
oImg.src = imgUrl // ?
document.body.appendChild(oImg)

import './assets/font/iconfont.css'
const i1 = document.createElement('i')
const i2 = document.createElement('i')
i1.className = 'iconfont icon-qq'
i2.className = 'iconfont icon-weixin'
document.body.appendChild(i1)
document.body.appendChild(i2)

const name = '技术痞瑞'
console.log(name)

const f = () => {
  console.log(name)
}
console.log(f)

console.log(['y', 'y', 'd', 's'].includes('yyds'))
new Promise(() => {
  console.log('技术痞瑞')
})
